package com.example.baseutils

import com.example.baseutils.LogUtils.log
import com.example.baseutils.application.BaseApplication
import okhttp3.Route
import java.io.File

/**
 * Author by lp,on 2020/8/31/031,13:59.
 */
object Constance {
    private val TAG = "Constance"
    const val BASE_URL = "http://120.76.55.111:9999"
    const val VERSION_BASE_URL = "http://120.77.237.242:8081"
    const val REPORT_BASE_URL = "http://game.didano.com:82"
    const val XIAONUO_BASE_URL = "http://api.didano.cn"
    const val HEIGHT_DEBUG_BASE_URL = "https://h5.didano.com"
    const val HEIGHT_BASE_URL = "https://www.didano.cn"

    //    const val SCORE_BASE_URL = "http://120.76.55.111:9999"
//    const val SCORE_BASE_URL = "http://192.168.8.192:7180"
    const val SCORE_BASE_URL = "http://mid.didano.com"

    const val LOGIN_DEBUG_BASE_URL = "http://midtest.didano.com"
    const val ROCK_DEBUG_BASE_URL = "http://120.77.205.203:12345"
    const val SEARCH_DEBUG_BASE_URL = "http://midtest.didano.com"
    const val SPORT_JUMP_AUTO_DEBUG_BASE_URL = "http://midtest.didano.com"
    const val LOGIN_BASE_URL = "http://xjfinal.didano.com/"
    const val ROCK_BASE_URL = "http://120.77.205.203:12345"
    const val CALL_BASE_URL = "http://xjfinal.didano.com/"
    const val CHAT_BASE_URL = "https://chatai.iloto.com.cn/"
    const val CHAT_NEW_BASE_URL = "https://robot.alefcloud.cn/"
    const val CHAT_NEW_V2_BASE_URL = "https://api.alefcloud.cn/"
    const val CHAT_SCORE_BASE_URL = "http://36.156.102.125:5050/"
    const val FANTACY_BASE_URL = "https://xjfinal.didano.com"
    const val ROUTE = "/enterprise"
//    const val FANTACY_BASE_URL = "http://192.168.110.65:48080"
//    const val ROUTE = ""
//    const val CALL_BASE_URL = "https://x15065n831.51vip.biz/"

    //    const val LOGIN_BASE_URL = "http://192.168.110.35:48080/"
//    const val ROCK_BASE_URL = "http://192.168.110.35:48080/"
    const val SEARCH_BASE_URL = "http://mid.didano.com"
    const val SPORT_JUMP_AUTO_BASE_URL = "http://mid.didano.com"
//    const val SPORT_JUMP_AUTO_BASE_URL = "http://120.77.45.91:7180"
//    const val SPORT_JUMP_AUTO_BASE_URL = "https://x15065n831.51vip.biz"


//    const val CALL_BASE_URL = "http://192.168.1.105:10888"

    //程序数据存储的主路径
    val ROOT_DIR =
        BaseApplication.instance.getExternalFilesDir(null)!!.absolutePath

    //照片保存路径
    val PIC_ROOT_DIR = ROOT_DIR + File.separator + "pictures"

    //下载文件路径
    private val DONWLOAD_ROOT_DIR = ROOT_DIR + File.separator + "download"

    //正常图片路径
    val VIDE_DIR = ROOT_DIR + File.separator + "video"
    val SAVE_VIDE_DIR = ROOT_DIR + File.separator + "save_video"

    //APK路径
    val APK_DIR = DONWLOAD_ROOT_DIR + File.separator + "apk"

    //人脸识别特征值路径
    val FACE_DIR = ROOT_DIR + File.separator + "face"
    val FEATURE_DIR = FACE_DIR + File.separator + "features"

    //测试检测图片保存路径
    val DETECT_PIC_ROOT_DIR = ROOT_DIR + File.separator + "photo"

     init {
        log(TAG, "init")
        //将今日的文件夹创建出来
        FileUtil.createDirs(VIDE_DIR).toString().log(TAG)
        FileUtil.createDirs(APK_DIR).toString().log(TAG)
        FileUtil.createDirs(PIC_ROOT_DIR).toString().log(TAG)
        FileUtil.createDirs(DETECT_PIC_ROOT_DIR).toString().log(TAG)
    }

    /*SP数据*/

    const val APP_ID = "3iVA5UvYhvrMLy4gfzAUfYCDf4AiFeGjvmUE3b32uxsy"
    const val SDK_KEY = "Bs1tiLfynhcSL8tX3rW1z7cEjyFDRoGqDyQs6Qzkbgkh"
    const val ACTIVE_KEY = "85F1-11AQ-T13A-BTDD"

    const val DEBUG_MODEL = "DEBUG_MODEL"

    /*设备类型*/
    const val SOFTWARE_SYSTEM_TYTE = 5

    /*设备号*/
    const val DEVICEID = "deviceid"

    /*医院名称*/
    const val SCHOOL_NAME = "SCHOOL_NAME"

    const val SCHOOL_ID = "SCHOOL_ID"

    const val SPACE_ID = "SPACE_ID"

    const val SLEEP_TIME = "SLEEP_TIME"
    const val CAMERA_ID = "CAMERA_ID"
    const val CAMERA_ZOOM = "CAMERA_ZOOM"
    const val CAMERA_ROTATE = "CAMERA_ROTATE_SHOW"
    const val VIDEO_ROTATE = "VIDEO_ROTATE"
    const val PHOTO_ROTATE = "PHOTO_ROTATE"

    const val OPEN_CAMARE = "OPEN_CAMARE"

    const val WIDTH = "WIDTH"
    const val HEIGHT = "HEIGHT"

    /*good异常阈值*/
    const val THRESHOLD_GOOD = "THRESHOLD_GOOD"
    var CAMERA_WIDTH = MySharedPreferences.read(WIDTH, 640)
    var CAMERA_HEIGHT = MySharedPreferences.read(HEIGHT, 480)

    /** 上下摄像头的bus号*/
    const val CAMERA_TOP_BUS = "CAMERA_TOP_BUS"
    const val CAMERA_BOTTOM_BUS = "CAMERA_BOTTOM_BUS"

    //默认的图片地址
    const val DEFUALTURL =
        "http://image-didanuo.oss-cn-shenzhen.aliyuncs.com/formal/850/5/36465/2018-05-15/68R6eiHYAhAx6rfTJjcQRPXxXrjzQeKH.jpg"


    /**资源下载链接*/
    const val VIDEO_DOWNLAOD_URL = "video_downlaod_url"

    /**默认的资源下载地址*/
    const val DEFAULT_DOWNLAOD_URL =
        "https://imagecdn.didano.com/IronRobot/%E6%95%85%E4%BA%8B%E5%9C%BA%E6%99%AF.zip"

    /**
     * 科大讯飞语音引擎包名
     * TALKBACK应用包名
     * */
    const val SEPEECH_APP_TAG = "com.iflytek.speechcloud"
    const val TALKBACK_APP_TAG = "com.google.android.marvin.talkback"

    const val BASE_APK_DOWN_URL = "https://imagecdn.didano.com/"
    const val SEPEECH_APP_DOWN_URL = "$BASE_APK_DOWN_URL/arpad/iflyttsfor7fter.apk"


    //app的模式、小车false、控制模式ture
    const val APP_MODE = "APP_MODE"

    const val PHONE_NUMBER = "PHONE_NUMBER"
    const val Authorization = "Authorization"
    const val AI_USER_NAME = "AI_USER"
    const val REFRESH_TOKEN = "REFRESH_TOKEN"
    const val EXPIRESTIME = "EXPIRESTIME"
    const val REFRESH_EXPIRESTIME = "REFRESH_EXPIRESTIME"
    const val U_ID = "UID"
    const val ROBOT_ID = "ROBOTID"
    const val INVITA_CODE = "INVITA_CODE"
    const val INVITA_CODE_FLY = "INVITA_CODE_FLY"

    const val CONTROL_MODE = "CONTROL_MODE"
    const val CONTROL_LEFT = "CONTROL_LEFT"

    const val PICK_MODEL = "PICK_MODEL"

    //    蓝牙地址
    const val SERVICE_CALL = "SERVICE_CALL"

}